<div class="tabbed">
	<ul class="tabs">
		<li id="tab-myopposites_opposites" class="tab<?php echo $active_tab == 'opposites' ? ' active' : ''?>">My opposites</li>
		<li id="tab-myopposites_respects" class="tab<?php echo $active_tab == 'respects' ? ' active' : ''?>">I respect</li>
	</ul>

	<div id="myopposites_opposites" class="content<?php echo $active_tab == 'respects' ? ' hide' : ''?>">
		<?php if($opposites_pager): ?>
		<ul class="small-people-list group">
			<?php foreach($opposites_pager->getResults() as $opposite):?>
			<?php /* @var $opposite Opposite */ ?>
			<li>
				<div class="avatar">
					<?php
						$className = $opposite->getShowProfile() == 1 ? 'class=profile profile-'.$opposite->getId() : '';
						echo image_tag($opposite->getThumbnailUrl(), 'alt='.$opposite->getName().' '.$className);
					?>
				</div>
				<div class="group">
					<span class="name">
						<strong><?php echo $opposite->getName()?></strong>
						<?php if($opposite->getCountry() || $opposite->getOrigin()):?>
							(<?php if($opposite->getCountry()) echo $opposite->getCountry()?>
							<?php if($opposite->getCountry() && $opposite->getOrigin()):?> - <?php endif;?>
							<?php if($opposite->getOrigin()): ?><em><?php echo $opposite->getOrigin()?></em><?php endif; ?>)
						<?php endif; ?>
					</span>
					<?php
						$percentage = $user->getOppositenessWith($opposite);
						$className  = Round(Round($percentage)/10) * 10;
					?>
					<span class="oppositeness-<?php echo $className?>"><?php echo Round($percentage) ?>%</span>
					<span class="respects">
						<?php echo $opposite->getNumRespects() ? $opposite->getNumRespects() : '0' ?> &times;
						<img src="http://<?php echo $basehost?>/images/gadget/respect-icon-wbg.gif" alt="Respect" />
					</span>
				</div>
			</li>
			<?php endforeach?>
		</ul>		

		<?php if($opposites_pager->haveToPaginate()): ?>
			<p class="group" style="margin-top: 10px;">
				<?php if($opposites_pager->getPreviousPage() < $opposites_pager->getPage()): ?>
					<?php echo link_to('previous five','myopposites/opposites?userid='.$userid.'&page='.$opposites_pager->getPreviousPage(),'class=prevlink'); ?>
				<?php endif; ?>
				<?php if($opposites_pager->getNextPage() > $opposites_pager->getPage()): ?>
					<?php echo link_to('next five','myopposites/opposites?userid='.$userid.'&page='.$opposites_pager->getNextPage(),'class=nextlink'); ?>
				<?php endif; ?>
			</p>
			<?php endif; ?>
		<?php endif; ?>
	</div>

	<div id="myopposites_respects" class="content<?php echo $active_tab == 'opposites' ? ' hide' : ''?>">
		<?php if(count($respected_users) > 0): ?>
		<ul class="small-people-list group">
			<?php foreach($respected_users as $otheruser):?>
			<?php /* @var $opposite Opposite */ ?>
			<li>
				<div class="avatar">
					<?php
						$className = $otheruser->getShowProfile() == 1 ? 'class=profile profile-'.$otheruser->getId() : '';
						echo image_tag($otheruser->getThumbnailUrl(), 'alt='.$otheruser->getName().' '.$className);
					?>
				</div>
				<div class="group">
					<span class="name">
						<strong><?php echo $otheruser->getName()?></strong>
						<?php if($otheruser->getCountry() || $otheruser->getOrigin()):?>
							(<?php if($otheruser->getCountry()) echo $otheruser->getCountry()?>
							<?php if($otheruser->getCountry() && $otheruser->getOrigin()):?> - <?php endif;?>
							<?php if($otheruser->getOrigin()): ?><em><?php echo $otheruser->getOrigin()?></em><?php endif; ?>)
						<?php endif; ?>
					</span>
					<?php
						$percentage = $user->getOppositenessWith($otheruser);
						$className  = Round(Round($percentage)/10) * 10;
					?>
					<span class="oppositeness-<?php echo $className?>"><?php echo Round($percentage) ?>%</span>
					<span class="respects">
						<?php echo $otheruser->getNumRespects() ? $otheruser->getNumRespects() : '0' ?> &times;
						<img src="http://<?php echo $basehost?>/images/gadget/respect-icon-wbg.gif" alt="Respect" />
					</span>
				</div>
			</li>
			<?php endforeach?>
		</ul>
		<?php else: ?>
		<p>You did not give respect to the comment of any other user yet.</p>
		<?php endif; ?>
	</div>
</div>